package edu.zju.gis.dbfg.common.exception;

import edu.zju.gis.dbfg.common.base.BaseException;
import edu.zju.gis.dbfg.common.constant.CodeConstants;

import java.util.Arrays;

/**
 * @author Hu
 * @date 2019/4/30
 **/
public class ValidationException extends BaseException {
  public ValidationException(Class clz, String method, String msg, String... data) {
    super(CodeConstants.VALIDATE_ERROR, String.format("无效的值：%s, %s, %s，%s", clz.getName(), method, Arrays.toString(data), msg));
  }

  public ValidationException(int code, String clz, String method, String msg, String... data){
    super(code, String.format("无效的值：%s, %s, %s，%s", clz, method, Arrays.toString(data), msg));
  }
}
